import { Request, Response } from 'express';

export default {
  'GET /api/menu': (req: Request, res: Response) => {
    res.send({
      success: true,
      errorMessage: '这是一条来自后台的错误信息',
      data: {
        list: [
          { name: '欢迎', path: '/welcome', icon: 'smile', component: '@/pages/Welcome' },
          {
            name: '系统管理',
            path: '/system',
            icon: 'Setting',
            access: 'canAdmin',
            routes: [
              { path: '/system/user', name: '用户管理', icon: 'User' },
              { path: '/system/role', name: '角色管理', icon: 'Team' },
              { path: '/system/menu', name: '菜单管理', icon: 'Menu' },
              { path: '/system/dept', name: '部门管理', icon: 'Apartment' },
              { path: '/system/post', name: '岗位管理', icon: 'Contacts' },
              { path: '/system/dict', name: '字典管理', icon: 'Book' },
              { path: '/system/config', name: '参数设置', hideInMenu: true, icon: 'Calculator' },
              { path: '/system/notice', name: '通知公告', icon: 'Message' },
              {
                path: '/system/log',
                name: '日志管理',
                icon: 'Snippets',
                routes: [
                  { path: '/system/log/operlog', name: '操作日志', icon: 'Tool' },
                  { path: '/system/log/logininfo', name: '登录日志', icon: 'Login' },
                ],
              },
            ],
          },
        ],
        total: 2,
      },
    });
  },
};
